/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MainJframe.java
 *
 * Created on 21 mai 2013, 16:21:09
 */

package Vue;
import javax.swing.JPanel;


/**
 *
 * @author yannick.henriet
 */
public class MainJframe extends javax.swing.JFrame {
JPanel current ;


    /** Creates new form MainJframe */
    public MainJframe() 
    {
        initComponents();
        jPanel1.invalidate();
    }

    public JPanel getPanel() {
    	return jPanel1;
    }
    public void addpanel(JPanel panel)
    {
        jPanel1.add(panel);
        //Control_IHM_user.currentpanel= panel;
        this.pack();
    }


    public void rmpanel ()
    {
        jPanel1.removeAll();
        this.pack();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

      jPanel1 = new javax.swing.JPanel();
      // jToggleButton1 = new javax.swing.JToggleButton();  //ajout d'un bouton de test dans le panel frame principal

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setBackground(new java.awt.Color(153, 255, 255));
        jPanel1.setLayout(new javax.swing.BoxLayout(jPanel1, javax.swing.BoxLayout.LINE_AXIS));

      //jToggleButton1.setText("jToggleButton1");  //ajout d'un bouton de test dans le panel frame principal

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(173, Short.MAX_VALUE)
             //  .addComponent(jToggleButton1) //ajout d'un bouton de test dans le panel frame principal
                .addGap(122, 122, 122))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 53, Short.MAX_VALUE)
               // .addComponent(jToggleButton1)  //ajout d'un bouton de test dans le panel frame principal
                .addGap(22, 22, 22))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
    * @param args the command line arguments
    */


               


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel jPanel1;
    	 //private javax.swing.JToggleButton jToggleButton1;  //ajout d'un bouton de test dans le panel frame principal
    // End of variables declaration//GEN-END:variables

}
